import request from '@/utils/request'

export function listLoadMaterial(query) {
    return request({
        url: '/mes-util/loadMaterial/list',
        method: 'get',
        params: query
    })
}

// 查询快速上料详细
export function getLoadMaterial(pkId) {
    return request({
        url: '/mes-util/loadMaterial/' + pkId,
        method: 'get'
    })
}

// 新增快速上料
export function addLoadMaterial(data) {
    return request({
        url: '/mes-util/loadMaterial',
        method: 'post',
        data: data
    })
}

export function addLoadMaterials(data) {
    return request({
        url: '/mes-util/loadMaterial/adds',
        method: 'post',
        data: data
    })
}

// 修改快速上料
export function updateLoadMaterial(data) {
    return request({
        url: '/mes-util/loadMaterial',
        method: 'put',
        data: data
    })
}

// 删除快速上料
export function delLoadMaterial(pkId) {
    return request({
        url: '/mes-util/loadMaterial/' + pkId,
        method: 'delete'
    })
}

export function getProfileActive() {
    return request({
        url: '/mesTool/getProfile',
        method: 'get'
    })
}

export function getWorks(work) {
    return request({
        url: '/mes-util/workInvIssuance/queryWorks?work=' + work + '&notPre=true',
        method: 'get',
    })
}
